package com.pmcc.core.vo;


import org.apache.commons.lang.StringUtils;

/**
 * Created by shijie on 2018/4/20.
 */
public class TokenVo {
    private String id;

    private String userName;

    private String userCname;//中文名

    private String mobile;//手机号

    private String email;//EMAIL//

    private String enabled; //0启用 1禁用

    private String sysOrgId;

    private String customerId;//客户id

    private String sysRoleId;

    private String menuKeys;

    private String sysOrgName;

    private String sysOrgCode;

    //三种情况：0：智能综合平台，1：生产分析，2：部门code为空，或者值不符合判断规则
    private String type="2";

    public TokenVo() {

    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getEnabled() {
        return enabled;
    }

    public void setEnabled(String enabled) {
        this.enabled = enabled;
    }

    public String getSysOrgId() {
        return sysOrgId;
    }

    public void setSysOrgId(String sysOrgId) {
        this.sysOrgId = sysOrgId;
    }

    public String getSysRoleId() {
        return sysRoleId;
    }

    public void setSysRoleId(String sysRoleId) {
        this.sysRoleId = sysRoleId;
    }

    public String getMenuKeys() {
        return menuKeys;
    }

    public void setMenuKeys(String menuKeys) {
        this.menuKeys = menuKeys;
    }

    public String getSysOrgName() {
        return sysOrgName;
    }

    public void setSysOrgName(String sysOrgName) {
        this.sysOrgName = sysOrgName;
    }

    public String getSysOrgCode() {
        return sysOrgCode;
    }

    public void setSysOrgCode(String sysOrgCode) {
        this.sysOrgCode = sysOrgCode;
        if(StringUtils.isNotEmpty(sysOrgCode)){
            if(sysOrgCode.startsWith("1")){//综合服务平台
                this.type = "0";
            }else if(sysOrgCode.startsWith("2")){//生产分析
                this.type = "1";
            }else{
                this.type = "2";
            }
        }else{
            this.type = "2";
        }
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCustomerId() {
        return customerId;
    }

    public void setCustomerId(String customerId) {
        this.customerId = customerId;
    }

    public String getUserCname() {
        return userCname;
    }

    public void setUserCname(String userCname) {
        this.userCname = userCname;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
}
